import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { LoginPage } from '../login/login';

/**
 * Generated class for the UserPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-user',
  templateUrl: 'user.html',
})
export class UserPage {

  user:any;

  constructor(public navCtrl: NavController, public navParams: NavParams) {

    let _user = localStorage.getItem('user');

    if(_user){
      this.user = JSON.parse(_user);
    }else{
      this.navCtrl.push(LoginPage);
    }
  }

  uploadImg(){
    
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad UserPage');
  }

}
